The GAMMA function returns the gamma function of Z.
The gamma function is defined as:
Use the LNGAMMA function to obtain the natural logarithm of the gamma function when there is a possibility of overflow.
Result = GAMMA(Z)
If Z is double-precision, the result is double-precision (either double or double complex), otherwise the result is single-precision (either float or complex).
The expression for which the gamma function will be evaluated. Z may be complex.
This routine is written to make use of IDL’s thread pool, which can increase execution speed on systems with multiple CPUs. The values stored in the !CPU system variable control whether IDL uses the thread pool for a given computation. In addition, you can use the thread pool keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to override the defaults established by !CPU for a single invocation of this routine. See Thread Pool Keywords for details.
Plot the gamma function over the range 0.01 to 1.0 with a step size of 0.01 by entering:
Z = FINDGEN(99)/100. + 0.01
PLOT, Z, GAMMA(Z)
Original |
Introduced |
5.6 |
Z argument accepts complex input |